<template>
	<view class="container">
		<view class="wrap">
			<view class="img" @tap='previewImage'>
				<image :src='voucher' mode="aspectFit"></image>
			</view>
			<button class="btn line-center" :disabled="isDisabled" @tap='back'>返回列表</button>
		</view>

	</view>
</template>

<script>
	const app = getApp();
	export default {
		data() {
			return {
				voucher: '',
			};
		},
		onLoad(option) {
			this.voucher = option.voucher ? option.voucher : '';
		},
		methods: {
			back() {
				uni.redirectTo({
					url: '/pages/recharge-record/recharge-record'
				})
			},
			previewImage() {
				uni.previewImage({
					urls: [this.voucher],
					longPressActions: {
						itemList: ['发送给朋友', '保存图片', '收藏'],
						success: function(data) {
							
						},
						fail: function(err) {
							console.log(err.errMsg);
						}
					}
				});
			},


		}
	}
</script>

<style lang="scss" scoped>
	.wrap {
		padding-top: 30rpx;
	}

	.img {
		width: 700rpx;
		height: 518rpx;
		margin: auto;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.btn {
		width: 654rpx;
		height: 84rpx;
		background: #1C1C1C;
		border-radius: 42rpx;
		color: #fff;
		font-size: 32rpx;
		margin: 124rpx auto;
	}
</style>